package 设计模式.l_责任链模式;

import java.util.Objects;

/**
 * @author caihe
 * @date 2023/3/13 15:41
 */
public class Request {

    private final RequestType requestType;
    private final String requestDesc;
    private boolean handled;

    public Request(RequestType requestType, String requestDesc) {
        this.requestType = Objects.requireNonNull(requestType);
        this.requestDesc = Objects.requireNonNull(requestDesc);
    }

    public RequestType getRequestType() {
        return requestType;
    }

    public String getRequestDesc() {
        return requestDesc;
    }

    public boolean isHandled() {
        return handled;
    }

    public void markHandled() {
        this.handled = true;
    }
}
